#define  _CRT_SECURE_NO_WARNINGS
class Solution {
    vector<string> ret;
    void dfs(string s, int index)
    {
        if (index == s.size())
        {
            ret.push_back(s);
            return;
        }
        char cur = s[index];
        if (isalpha(cur))
        {
            s[index] = toupper(cur);
            dfs(s, index + 1);
            s[index] = tolower(cur);
        }
        dfs(s, index + 1);
    }

public:
    vector<string> letterCasePermutation(string s) {
        dfs(s, 0);
        return ret;
    }
};